namespace ASPNET.StarterKit.IssueTracker
{
    using ASPNET.StarterKit.IssueTracker.UserInterfaceLayer;
    using System;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    public class NewProjectIntro : UserControl, IEditProjectControl
    {
        [AccessedThroughProperty("chkSkip")]
        private CheckBox _chkSkip;
        private int _ProjectId;
        private object designerPlaceholderDeclaration;

        public NewProjectIntro()
        {
            base.Init += new EventHandler(this.Page_Init);
            this._ProjectId = -1;
        }

        public void Initialize()
        {
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
        }

        private void Page_Init(object sender, EventArgs e)
        {
            this.InitializeComponent();
        }

        public bool Update()
        {
            if (this.chkSkip.Checked)
            {
                this.Response.Cookies["skipprojectintro"].Value = "1";
                this.Response.Cookies["skipprojectintro"].Path = "/";
                this.Response.Cookies["skipprojectintro"].Expires = DateTime.MaxValue;
                this.Response.Redirect("AddProject.aspx");
            }
            return true;
        }

        int ASPNET.StarterKit.IssueTracker.UserInterfaceLayer.IEditProjectControl.ProjectId
        {
            get
            {
                return this._ProjectId;
            }
            set
            {
                this._ProjectId = value;
            }
        }

        protected virtual CheckBox chkSkip
        {
            get
            {
                return this._chkSkip;
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            set
            {
                if (this._chkSkip != null)
                {
                }
                this._chkSkip = value;
                if (this._chkSkip != null)
                {
                }
            }
        }

        public int ProjectId
        {
            get
            {
                return this._ProjectId;
            }
            set
            {
                this._ProjectId = value;
            }
        }
    }
}

